feat: Add support for different output formats on project view and project variables view command#328
feat: Add support for different output formats on project view and project variables view command#328harrisonmeister wants to merge 8 commits intomainfrom
Conversation
|
Linked with #318 which looks to fix |
There was a problem hiding this comment.
Looks good to me, I tested it locally and all is working well. Just one question but nothing blocking.
Also you might need to squash and merge this PR and include a conventional commit on the merge commit so we get a release note generated for this change
| fmt.Fprintln(out, output.Bold(filteredVars[0].Name)) | ||
| for _, v := range filteredVars { | ||
| data := []*output.DataRow{} | ||
|
|
There was a problem hiding this comment.
Should this also print out the KEY VALUE heading like the project view does?
| data = append(data, output.NewDataRow(output.Bold("KEY"), output.Bold("VALUE"))) |
There was a problem hiding this comment.
Not against that change - although it perhaps should only apply to the table format (as it is with project view) ?
There was a problem hiding this comment.
Yeah definitely, it would probably be a bit confusing in the basic format
There was a problem hiding this comment.
I've made a change in 98078bf but wanted to mention that Ben P mentioned he was going to review the view command output format holistically. See this thread (internal link) for more details.
Added support for basic, json and table formats for the following octopus commands:
project viewproject variable viewPartially fixes #312 (for
project viewBefore
project view:After
project view:BASIC format
TABLE format:
JSON format:
Note: this PR does change the output to be in table view if no format is specified for
project view. This seems logical given the default output format is table anyway.Before
project variable view:After
project variable view:BASIC and TABLE format: No change
JSON format: